from dashboard.models import Historico, Coletor
from django.shortcuts import render_to_response
from django.http import HttpResponse

def index(request):
    coletores  = Coletor.objects.all()
    
    id = request.GET.get('sel_salas') 
    historico = Historico.objects.filter(coletor=id)
    
    return render_to_response('index.html', {'hist': historico, 'col': coletores } )
